<style>
    .layui-form-item .layui-input-inline {
        width: 260px;
    }
</style>
<div class="layui-form" lay-filter="layPopup" style="padding: 20px 30px 0 0;">
    <script template type="text/html">
        <div class="layui-form-item">
            <label class="layui-form-label">上级菜单</label>
            <div class="layui-input-block" id="menuXmSelect"></div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">规则类型</label>
            <div class="layui-input-block">
                <input name="type" type="radio" disabled value="menu_dir" title="菜单目录" {{
                       d.params.type=== 'menu_dir' ? 'checked' : '' }} >
                <input name="type" type="radio" disabled value="menu" title="菜单项" {{
                       d.params.type=== 'menu' ? 'checked' : '' }} >
                <input name="type" type="radio" disabled value="button" title="页面按钮" {{
                       d.params.type=== 'button' ? 'checked' : '' }} >
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">规则标题</label>
            <div class="layui-input-block">
                <input type="text" name="title" value="{{ d.params.title }}" readonly placeholder="请输入规则标题"
                       autocomplete="off"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">规则名称</label>
            <div class="layui-input-block">
                <input type="text" value="{{ d.params.name }}" placeholder="" autocomplete="off"
                       readonly class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">规则路径</label>
            <div class="layui-input-block">
                <input type="text" value="{{ d.params.path }}" placeholder="" autocomplete="off"
                       readonly class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">规则备注</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入规则备注" name="remark"
                          class="layui-textarea">{{ d.params.remark }}</textarea>
            </div>
        </div>

        {{# if(d.params.type === 'menu' || d.params.type === 'menu_dir'){ }}
        <div class="layui-form-item">
            <label class="layui-form-label">规则权重</label>
            <div class="layui-input-block">
                <input type="text" name="weigh" value="{{ d.params.weigh }}" placeholder="请输入规则权重"
                       autocomplete="off"
                       class="layui-input">
                <span class="required_class">*排序序号(数字越大越靠前)</span>
            </div>
        </div>
        {{# } }}
        <!--    <div class="layui-form-item">-->
        <!--        <label class="layui-form-label">状态</label>-->
        <!--        <div class="layui-input-block">-->
        <!--            {{#  if(d.params.status == '1'){ }}-->
        <!--            <input type="checkbox" checked lay-skin="switch" title="启用|禁用"-->
        <!--                   lay-filter="statusSwitch">-->
        <!--            {{#  } else { }}-->
        <!--            <input type="checkbox" lay-skin="switch" title="启用|禁用" lay-filter="statusSwitch">-->
        <!--            {{#  } }}-->
        <!--        </div>-->
        <!--    </div>-->
        <input type="hidden" id="pid" value="{{ d.params.pid }}">
        <input type="hidden" name="id" value="{{ d.params.id }}">
        <input type="hidden" id="status" name="status" value="{{ d.params.status }}">
    </script>
    <div class="layui-form-item">
        <label class="layui-form-label"></label>
        <div class="layui-input-inline">
            <input class="layui-btn" lay-filter="laySubmitEdit" lay-submit type="button" value="确认">
        </div>
    </div>
</div>

<script lay-done="layui.data.sendParams(d.params)" template type="text/html"></script>
<script src="../web/res/js/auth/menu/other.js"></script>
